<?php

require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'LzVars.php';


/**
 *  URL arguments class.
 *
 *  @author     GoniX aka Giedrius Dubinskas
 *  @created    2008-01-05
 */
class LzUrlArgs
        extends LzVars
{
    public
    function toStr($delimiter = NULL)
    {
        if (is_null($delimiter))
            return http_build_query($this->toArr(), $this->prefix);
        else
            return http_build_query(
                    $this->toArr(),
                    $this->prefix,
                    $delimiter
                );
    }


    public
    function numPrefix($prefix = NULL)
    {
        if (is_null($prefix))
        {
            return $this->prefix;
        }
        else
        {
            $this->prefix   = $prefix;
            return $this;
        }
    }


    protected   $prefix = 'a';
}

